<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <head>
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <title>Matrimony | Home</title>
        <link rel="stylesheet" href="css/style.css"/>
    </head>
    <body>

        <div id="page-wrap">
            <div id="banner">
                <h1><a href="index.xhtml">Matrimony</a></h1>
            </div><!--End banner-->
            <div id="main-content">
                <div id="sidebar">
                    <h:form>
                        <div id="mainNav">
                            <ul>
                                <li><h:commandLink action="#{matrinonyBean_c.gotoHome()}" value="Home"/></li>
                                <li><h:commandLink action="#{matrinonyBean_c.gotoRegister()}" value="Register"/></li>
                                <li><h:commandLink action="#{matrinonyBean_c.gotoSearch()}" value="Search"/></li>
                                <li><h:commandLink action="#{matrinonyBean_c.gotoService()}" value="Service"/></li>
                                <li><h:commandLink action="#{matrinonyBean_c.gotoContact()}" value="Contact"/></li>
                                <li><h:commandLink action="#{matrinonyBean_c.gotoUpdate()}" value="Update Profile"/></li>
                            </ul>
                        </div><!--End mainNav-->
                    </h:form>
                    <div id="loginForm">
                        <section id="loginForm">
                            <f:view>
                                <h:form rendered="#{loginBean1.isLoggedIn}">
                                    <center>
                                        <h1>
                                            HELLO <h:outputText value="#{loginBean1.username}" style="color:gold"/>                                        
                                        </h1><br/>
                                        <h:commandLink action="#{loginBean1.logOut()}" value="Log out"/>
                                    </center>
                                </h:form>
                                <h:form rendered="#{!loginBean1.isLoggedIn}">

                                    <center><h1>LOGIN</h1></center><br/>
                                    <br/>
                                    <div>
                                        <label>Username</label>
                                        <h:inputText value="#{loginBean1.username}" required="true" requiredMessage="please enter username"  />
                                    </div>
                                    <div>
                                        <label>Password</label>
                                        <h:inputText value="#{loginBean1.password}" required="true" requiredMessage="please enter password"  />
                                    </div>
                                    <!--							<div>
                                                                                                    <input type="checkbox" name="" value="check"/> Keep me logged in
                                                                                            </div>-->
                                    <p>
                                    <h:outputText value="#{loginBean1.errorMessage}" style="color: red; font-size: smaller"/>
                                    </p>
                                    <div class="button">
                                        <h:commandButton action="#{loginBean1.loginForm()}" value="Login"/>
                                    </div>
                                </h:form>
                            </f:view>

                        </section><!-- content -->
                    </div><!--End Login Form-->
                </div><!--End sidebar-->
                <f:view>
                    <h:form>
                        <div id="primary">
                            <ui:repeat value="#{matrinonyBean_c.loadData()}" var="m">
                                <div class="post-item">
                                    <div class="metadata">
                                        <img src="images/motive.jpg" alt="post image" />
                                        <p class="post"><strong>Name</strong>: <h:outputText value="#{m.full_Name}"/></p>
                                        <p class="date"><strong>Age</strong>: <h:outputText value="#{m.dateOfBirth}"/></p>
                                        <p class="comments"><strong>Marital Status</strong>: <h:outputText value="#{m.marital_Status}"/></p>
                                    </div><!--End metadata-->
                                    <h1><a href="#">Detail Information</a></h1>
                                    <p>
                                        <h:outputText value="#{m.family_Details}"/>
                                    </p>
                                    <div class="readMore"><h:commandLink value="View Profile Detail" action="#{matrinonyBean_c.gotoDetailPage(m.account_Id)}"/></div>
                                </div><!--End post-item-->
                            </ui:repeat>
                        </div><!--End primary-->
                    </h:form>
                </f:view>
            </div><!--End main content-->

            <div id="footer">
                <h:form>
                    <div id="footerNav">
                        <p class="copyright">Copyright 2013 Group 3 - C1103L - Matrimony site .</p>
                        <ul>
                            <li><h:commandLink action="#{matrinonyBean_c.gotoHome()}" value="Home"/></li>
                            <li><h:commandLink action="#{matrinonyBean_c.gotoRegister()}" value="Register"/></li>
                            <li><h:commandLink action="#{matrinonyBean_c.gotoSearch()}" value="Search"/></li>
                            <li><h:commandLink action="#{matrinonyBean_c.gotoService()}" value="Service"/></li>
                            <li><h:commandLink action="#{matrinonyBean_c.gotoContact()}" value="Contact"/></li>
                        </ul>

                    </div><!--End footerNav-->
                </h:form>
                <div id="footerInfo">
                    <img src="images/author.png" alt="author comment" />
                    <div class="rules">
                        <div class="inside">
                            <p>
                                The wedding event is no more a home manageable affairs where one requires the different service providers to be contacted and negotiated. Furthermore, the precious time and resources consumed during the whole process of finding and searching the ideal match. In Today’s generation the search of the life partner is searched through internet. The candidate can input his/her requirement according to their needs and perform search operation to get their Ideal Match. This process has now gain success it is less time consuming and multiple searches can be implemented in less time.
                            </p>
                            <ol>
                                <li>If you want to <a href="search.html">look for</a> groom or bride , please go to <a href="index.html">Matrimony</a> site .</li>
                                <li><a href="contact.html">Contact us</a> when you have any questions nedd answer .</li>
                                <li>Please <a href="register.html">register</a> to experience .</li>
                            </ol>
                            <p>For Administrator : <a href="#">Admin Control Panel</a></p>
                            <p><a href="index.html">That's it! Enjoy your stay and remember to comeback often.</a></p>
                        </div><!--End inside-->
                    </div><!--End rules-->
                </div><!--End footerInfo-->
            </div><!--End footer-->
        </div><!--End page wrap-->

    </body>
</html>
